This article mainly introduces the Python built-in function dir. This article describes the command introduction, the use of instances, the use of dir to find all classes under the module, and how to find the classes under the current module, for
Python built-in functions dir and pythondir
1. Command Introduction
Recently I learned and used a python built-in function dir. First, help:Copy codeThe Code is as follows:>>> Help (dir)Help on built-in function dir in module _ builtin __:
Dir ()Dir
1. Command Introduction
Recently learned and used a python built-in function, dir, first help:Copy the Code code as follows:
>>> Help (dir)
Help on built-in function dir in module __builtin__:
Dir ()Dir ([object]), List of strings
Return an
1. Order Introduction
Recently learned and used a Python built-in function dir, first help:
Copy Code code as follows:
>>> Help (dir)
Help on built-in function dir in module __builtin__:
Dir ()Dir ([object])-> list of strings
Python __dict__ with Dir ()
Python __dict__ and Dir
__dict__ Property
Dir function
Conclusion
Reprint please indicate the source (http://blog.csdn.net/lis_12/article/details/53521554).Python has all the
Based on the differences between Python _ dict _ and dir (), python _ dict _
In Python, everything is an object. Each object has multiple attributes. Python has a unified management solution for attributes.
Differences between _ dict _ and dir:
Dir (
The python function-dir () has been a little busy recently. after just a year, many things have been accumulated and need to be processed. Therefore, a function can only be updated every two days, I apologize to you here.
Today, let's look at a
This article mainly introduces you about how Python uses the Dir function to see all the member functions in the class, the text of the sample code introduced in very detailed, for everyone to learn or use Python has a certain reference learning
Dir () built-in functionsThere are many built-in python methods. No beginner or experienced python programmers can remember all the methods. At this time, the dir () function is very useful. You can use the dir () function to view all objects and
1. List of document Resources
Form
Role
#注释
Documents in the file
Dir function
List of available properties in the object
Document string: __doc__
A document near the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.